package com.share.user.api;

import com.share.common.core.domain.R;
import com.share.user.api.domain.UpdateUserLogin;
import com.share.user.api.domain.UserInfo;
import com.share.user.api.factory.RemoteUserInfoFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 用户服务
 *
 * @author share
 */

@FeignClient(contextId = "remoteUserInfoService", value ="share-user", fallbackFactory = RemoteUserInfoFallbackFactory.class)
public interface RemoteUserInfoService
{
    /**
     * 通过用户名查询用户信息
     * @return 结果
     */
    @GetMapping("/userInfo/wxLogin/{code}")
    public R<UserInfo> wxLogin(@PathVariable("code") String code);

    @PutMapping("/userInfo/updateUserLogin")
    public R<Boolean> updateUserLogin(@RequestBody UpdateUserLogin u);

}
